import request from "./request"

export const createReport = async reportForm =>{
  return await request({
    method:"POST",
    url:"/report/create",
    data:reportForm
  })
}

export const findReportByCreatorId = async creatorId =>{
  return await request({
    method:"GET",
    url:"/report/find/creator_id",
    data:{creatorId}
  })
}

export const findReportById = async id =>{
  return await request({
    method:"GET",
    url:"/report/find/id",
    data:{id}
  })
}

export const findReportOnLimit = async (limit,skip)=>{
  return await request({
    method:"GET",
    url:"/report/find/condition",
    data:{
      limit,
      skip
    }
  })
}

export const updateReportScoreById = async (id,addedScore)=>{
  return request({
    method:"POST",
    url:"/report/update/score",
    data:{
      id,
      addedScore
    }
  })
} 